1. Field of the Invention
The present invention relates to a coding system for a facsimile apparatus or like image processing apparatus which processes color images. More particularly, the present invention relates to a coding system of the kind which divides image information which are read in multiple levels into a plurality of level planes and, then, codes the information on a level plane basis, and a coding system which allows even a black-white facsimile apparatus to transmit color image signals without resorting to substantial remodeling of its data compression device.
2. Discussion of Background
In an image processing apparatus such as a facsimile apparatus, images which are colored are decomposed into a plurality of color components (usually three primary colors) and then read component by component so as to provide color plane information associated respectively with the components. Concerning halftone images, the apparatus reads them in terms of multi-level image signals each having a plurality of bits and, then, provides level planes each covering data in the corresponding bits of the image signals, thereby processing the images on a level plane basis as image signals.
Generally, image information are far greater in amount as well as in redundancy than other kinds of information. In an apparatus for transmitting image informations such as a facsimile apparatus or an apparatus for storing image information such as a video file apparatus, processing picture information as it is would make the efficiently significantly poor due to the characteristics particular to image information as mentioned above and, in light of this, coding which is effective to reduce the redundancy is performed so as to transmit or store the so coded data. A Group 3 facsimile apparatus, for example, compresses image information either in a one-dimensional coding mode (MH coding mode) or in a two-dimensional coding mode (MR coding mode) in order to enhance the transmission efficiency.
The coding systems stated above commonly use one document scanning line as a unit. Specifically, in the one-dimensional coding mode, state transistions of pixels are detected to code the run-length between the transitions, while in the two-dimensional coding mode one line is one-dimensionally coded first and then K-1 consecutive lines, at maximum, are two-dimensionally coded. The two-dimensional coding is based on a sequential procedure in which the positions of transition pixels in a line being currently coded are coded referencing the positions of their corresponding reference pixels in a coding line or a reference line immediately before the coding line. After the coding line has been coded, it serves as a reference line for the next coding line (see CCITT Recommendation T.4).
An exemplary data format provided by the one-dimensional coding mode is shown in FIG. 1, and an exemplary data format provided by the two-dimensional coding mode in FIG. 2. In the format associated with the one-dimensional coding mode, coded data DC relating to consecutive lines are separated from each other by an end-of-line (EOL) code adapted for discrimination. In the format associated with the two-dimensional coding mode, a tag bit TAG represenative of a particular coding mode of coded data CD intervenes between an EOL code and the data CD.
Color plane information provided by reading color images and level plane information provided by reading halftone images as previously described may be coded as follows. The information are coded on a scanning line basis and in any one of the above-discussed one-dimensional and two-dimensional coding modes depending upon the level plane. The resulting codes are arranged in the order of scanning lines, while identification data representative of a particular level plane is added to the head of coded data.
Such a system derives the format shown in FIG. 3 in the case of the one-dimensional coding mode and the format shown in FIG. 4 in the case of the two-dimensional coding mode, by way of example. Specifically, in accordance with the one-dimensional coding mode, a level plane code L is positioned between an EOL code and coded data DC, while in accordance with the two-dimensional coding mode a level plane code L is positioned between an EOL code and a tag bit TAG. In Japanese Unexamined Patent Publication (Kokai) No. 68973/1982, for example, the level plane codes L are implemented using Gray codes which are shown in Table 1 below.
TABLE 1 ______________________________________ DECIMAL GRAY NUMBER CODE ______________________________________ 15 1000 14 1001 13 1011 12 1010 11 1110 10 1111 9 1101 8 1100 7 0100 6 0101 5 0111 4 0110 3 0010 2 0011 1 0001 0 0000 ______________________________________
In Table 1, the decimal numbers are associated with densities of level planes in one-to-one correspondence.
Such a Gray code scheme, however, brings about the following problem in providing level plane codes.
Assuming an occurrence that white has continued over 2,048 bits in the one-dimensional coding mode, for example, then the level plane code L is "0000" because the density is zero, while a MH (modifid Huffman) code representative of the 2,048 bits of white is "000000010011". In this condition, the four ZEROs constituting the level plane code L and the seven consecutive ZEROs of the codeword and one ONE at the eighth bit of the codeword provide the same content as an EOL code, "000000000001", thereby impairing the individuality of the EOL code. Likewise, assuming a zero-level line to be two-dimensionally processed and a non-compression mode, the level plane signal L is "0000", the tag bit TAG is "0", and the associated codeword is "0000001", again constituting a false EOL code to impair the individuality of the latter.
One approach to solve the above problem is the use of special codes as the level plane codes which are not the Gray codes but those in which more than three ZEROs do not appear continuously. Another approach is ONE insertion processing which, concerning data other than EOL codes, inserts a ONE just after a stream of consecutive ZEROs. However, the special code scheme is undesirable because it excessively limits the use of codes, while the ONE insertion scheme cannot be implemented without the need for a complicated apparatus construction.
Codes provided by the above-discussed one-dimensional coding mode may be formatted as shown in FIG. 5. As shown, level plane codes L1-L4 respectively are inserted between EOL codes and coded data DC in corresponence with the level planes of their associated coded data DC. The four streams of coded data DC are arranged one after another on the basis of a unit block (in this case, one scanning line). This system gives rise to a problem due to the fact that the coded data DC in all the level planes are outputted. Specifically, assuming that the level planes are associated with color information, even the coded data representative of color information which actually do not exist would be outputted as exemplified by the level L2 on a line (n+1) and the level L2, L3 and L4 on a line (n+2), resulting in a slow coding rate.
Meanwhile, data coding systems include a two-dimensional compression system as described in CCITT Recommendation T.44.2 and designed for black-white facsimile. Most of Group 3 facsimile apparatuses rely on such a system. Although entirely new data compression systems may be devised, such would result in intricate and, therefore, expensive apparatuses. It is desirable from the economy standpoint, therefore, that color image signals be transmitted without resorting to drastic modification of existing coding devices.